home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / util / cli / grep.readme < prev    next >
Encoding:
Text File  |  1992-08-14  |  1.3 KB  |  26 lines

  1. SHORT: grep for tha amiga, 2.04 (or later) only.
  2.  
  3. grep scans file(s) looking for a given pattern. This pattern is not
  4. an Unix regexp, but an AmigaDOS pattern; * can be used everywhere as
  5. synonim of #?. Wildcard characters are allowed in the file name(s),
  6. everywhere BUT NOT in the device part-e.g. DF0:*/*.c BUT NOT DF*:... .
  7. The options can be specified alone or together, e.g. grep -i -l ...
  8. or grep -il ... . Example: grep -il assign s:*
  9.  
  10. GREP      Usage:   grep [options] pattern [ File [ File [ ... ]]
  11.           Purpose: Searches files (a pattern can be given in the file
  12.                    name(s)) for lines containing a given pattern (with
  13.                    the AmigaDOS conventions). If no file names are
  14.                    given, grep assumes standard input.
  15.                    Exit status is 0 if any matches are found, 5
  16.                    (warning) if none, 10 (error) for unreadable files
  17.                    or other errors.
  18.           Options: -c Print only the number of the matching lines;
  19.                    -i Ignore upper/lower case distinctions in the
  20.                       comparison;
  21.                    -l Print the name of the files with matching lines
  22.                       (once);
  23.                    -n Precede each line by its line number;
  24.                    -v Print all lines except those that contain the
  25.                       pattern.
  26.